package com.redxiii.spike.handlers;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.redxiii.spike.api.communication.CommunicationService;
import com.redxiii.spike.api.message.ImStatusMessage;

/**
 * @author Daniel Filgueiras
 * @since Feb 21, 2013
 */
public class BasicImHandler extends AbstractImHandler {

	private final Logger logger = LoggerFactory.getLogger(getClass());
			
	@Override
	public void init(CommunicationService service) {
	}

	@Override
	public void close() {
	}
	
	protected boolean handle(ImStatusMessage message) {
		logger.debug("Status from {} has changed to {}", message.getRemoteId(), message.getStatus());
		return true;
	}
}
